package com.nlp.trie.viterbi;

public class State {
	
	public String name;
	ProbTable emits;
	ProbTable linksto;
	
	public State(String s) {
		name = s;
		emits = new ProbTable();
		linksto = new ProbTable();
	}
	
	public void normalize() {
		emits.normalize();
		linksto.normalize();
	}
	
	public void addSymbol(Symbol sym, double prob) {
		emits.put(sym, prob);
	}

	public double emitprob(Symbol sym) {
		return emits.get(sym);
	}
	
	public void addLink(State st, double prob) {
		linksto.put(st, prob);
	}

	public double transprob(State st) {
		
		return linksto.get(st);
	}
	
	
}
